﻿namespace BM.Tools.WebControls.MForm.Controls.ValueFormatters
{
    /// <summary>
    /// A formatter used to replace new line html line break tag.
    /// </summary>
    public class BreakLineFormatter : StringFormatter
    {
        /// <summary>
        /// Replaces a new line with a line break
        /// </summary>
        /// <param name="value">
        /// The value.
        /// </param>
        /// <returns>
        /// the formatted string
        /// </returns>
        public override string Format(string value)
        {
            return value.Replace("\n", "<br />");
        }
    }
}
